package com.logis.ryanrqwork.daoutil;

import android.content.Context;

import com.logis.ryanrqwork.DBController;
import com.logis.ryanrqwork.dao.WinesShap;

import java.util.List;

public class WinesShapDaoController {
    /**
     * 更新一条酒店信息
     * @param shap
     */
    public static void updateWines(Context context,WinesShap shap){
        DBController.getInstance(context).getDaoSession().getWinesShapDao().insertOrReplace(shap);
    }
    /**
     * 获取所有酒店信息
     * @return
     */
    public static List<WinesShap> getWinesShap(Context context){
        return  DBController.getInstance(context).getDaoSession().getWinesShapDao().loadAll();
    }
}
